﻿@using StarBlog.Web.Utils
@inject StarBlog.Web.Contrib.SiteMessage.MessageService Messages

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="画星星高手博客；程序设计实验室博客；">
    <meta name="author" content="DealiAxy">
    <meta name="generator" content="StarBlog">
    <title>StarBlog · 画星星高手 - @ViewData["Title"]</title>

    <link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css">
    <link rel="stylesheet" href="~/lib/font-awesome/css/all.css">
    <link rel="stylesheet" href="~/css/features.css">
    <link rel="stylesheet" href="~/css/metro.css">
    <link rel="stylesheet" href="~/css/footer.css">
    <script src="~/js/site.preload.js"></script>

    @await RenderSectionAsync("head", false)
</head>
<body>

<header id="vue-header">
    <div class="px-3 py-2 bg-dark text-white">
        <div class="container">
            <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
                <a class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none"
                   asp-controller="Home" asp-action="Index">
                    <img src="~/images/codelab.jpg" class="rounded-circle" alt="" style="height: 64px;width: 64px;">
                </a>

                <ul class="nav col-12 col-lg-auto pt-1 my-2 justify-content-center my-md-0 text-small">
                    <li>
                        <a class="nav-link text-white" asp-controller="Home" asp-action="Index">
                            <div class="bi d-block mx-auto mb-1 text-center">
                                <i class="fa-solid fa-house fa-2xl"></i>
                            </div>
                            Home
                        </a>
                    </li>
                    <li>
                        <a class="nav-link text-white" asp-controller="Blog" asp-action="List">
                            <div class="bi d-block mx-auto mb-1 text-center">
                                <i class="fa-solid fa-table-list fa-2xl"></i>
                            </div>
                            Blog
                        </a>
                    </li>
                    <li>
                        <a class="nav-link text-white" asp-controller="Photography" asp-action="Index">
                            <div class="bi d-block mx-auto mb-1 text-center">
                                <i class="fa-solid fa-images fa-2xl"></i>
                            </div>
                            Photos
                        </a>
                    </li>
                    @* <li> *@
                    @*     <a class="nav-link text-white" asp-controller="Product" asp-action="Index"> *@
                    @*         <div class="bi d-block mx-auto mb-1 text-center"> *@
                    @*             <i class="fa-solid fa-cubes fa-2xl"></i> *@
                    @*         </div> *@
                    @*         Products *@
                    @*     </a> *@
                    @* </li> *@
                    @* <li> *@
                    @*     <a href="#" class="nav-link text-white"> *@
                    @*         <div class="bi d-block mx-auto mb-1 text-center"> *@
                    @*             <i class="fa-solid fa-terminal fa-2xl"></i> *@
                    @*         </div> *@
                    @*         Console *@
                    @*     </a> *@
                    @* </li> *@
                    <li>
                        <a class="nav-link text-white" asp-controller="About" asp-action="Index">
                            <div class="bi d-block mx-auto mb-1 text-center">
                                <i class="fa-solid fa-circle-info fa-2xl"></i>
                            </div>
                            About
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <div class="px-3 py-2 border-bottom mb-3">
        <div class="container d-flex flex-wrap justify-content-center">
            <form class="col-12 col-lg-auto mb-2 mb-lg-0 me-lg-auto"
                  asp-controller="Search" asp-action="Blog">
                <input type="search" class="form-control" placeholder="Search..." aria-label="Search" name="keyword">
            </form>

            <div class="text-end">
                <span class="dropdown me-2">
                    <a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-bs-toggle="dropdown" aria-expanded="false">
                        Themes
                    </a>
                    <ul class="dropdown-menu" aria-labelledby="dropdownMenuLink">
                        <li v-for="theme in themes">
                            <a v-if="theme.name===currentTheme" class="dropdown-item active">{{theme.name}}</a>
                            <a v-else class="dropdown-item" v-on:click="setTheme(theme.name)">{{theme.name}}</a>
                        </li>
                    </ul>
                </span>
                @* todo 登录注册功能后续再来 *@
                @* <button type="button" class="btn btn-light text-dark me-2">Login</button> *@
                @* <button type="button" class="btn btn-primary">Sign-up</button> *@
            </div>
        </div>
    </div>
</header>

<main id="vue-app">
    <div class="container mt-3">
        @while (!Messages.IsEmpty) {
            var message = Messages.Dequeue();
            <partial name="Widgets/Alert" model="message"/>
        }
    </div>
    @RenderBody()
</main>

<footer class="bg-dark">
    <div id="footer">
        <div class="container">
            <div class="row">
                <div id="footer-content" class="col-md-10 col-md-offset-3 footer-list text-center">
                    <p class="social-icons">
                        <a target="_blank" rel="nofollow" href="https://www.cnblogs.com/deali/"><i class="fa-solid fa-blog"></i></a>
                        <a asp-controller="About" asp-action="Index"><i class="fab fa-weixin"></i></a>
                        <a target="_blank" rel="nofollow" href="https://live.bilibili.com/11883038"><i class="fa-brands fa-bilibili"></i></a>
                        <a target="_blank" rel="nofollow" href="http://github.com/Deali-Axy"><i class="fab fa-github"></i></a>
                        <a target="_blank" rel="nofollow" href="https://www.zhihu.com/people/dealiaxy"><i class="fab fa-zhihu"></i></a>
                    </p>

                    <p>
                        Copyright © @DateTime.Now.Year.ToString()
                        <a href="https://github.com/Deali-Axy">DealiAxy</a>. All Rights Reserved.
                    </p>
                    <p>
                        All content is released under
                        <a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en" rel="external nofollow" target="_blank">
                            Creative Commons
                            BY-NC-SA 3.0
                        </a>.
                        <br>
                        If articles including programming codes (e.g. Java, Python, C#, Go) are exceptions, which are released under
                        <a href="http://www.gnu.org/licenses/gpl.html"
                           rel="external nofollow" target="_blank">
                            GPL
                            v3
                        </a>.
                    </p>
                    <p>
                        所有內容皆以<a href="http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en" rel="external nofollow" target="_blank"> 知识共享署名-相同方式共享 4.0 国际许可协议 </a>进行发布。<br>
                        含有程序代码內容的文章 (如 Java, Python, C#, Go) 除外，包含的程序代码皆以 <a href="http://www.gnu.org/licenses/gpl.html" rel="external nofollow" target="_blank">GPL v3</a> 发布。
                    </p>
                    <p>
                        本站使用 <a href="https://github.com/Deali-Axy/StarBlog">StarBlog</a> 开源博客系统，
                        基于 <a href="https://dotnet.microsoft.com/zh-cn/">.NetCore</a> 技术构建
                    </p>
                </div>
            </div>
        </div>
    </div>
</footer>


<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/lib/vue/dist/vue.js"></script>
<script src="~/js/site.js"></script>
@await RenderSectionAsync("bottom", false)
</body>
</html>